<header class="header">
	<a class="btn btn_ht btn_z" href="#!/previous">
		<span class="z"></span><span class="y">返回</span>
	</a>
	<h2 class="title">社区</h2>
	<a class="btn btn_y btn_h js_reply" href="javascript:void(0)" data-tid="<%= tid %>">
		<span class="z"></span><span class="y">回复</span>
	</a>
</header>
	
<div class="wrapper" id="wrapper_bbsItem">
	<div class="subject" id="bbs_item_subject">
		<h3 class="title"><%= post.subject %></h3>
		<p class="fav">
			<% if(post.isCollect){ %>
			<img src="./img/faved.png" alt="已收藏">
			<% } else { %>
			<img src="./img/fav.png" alt="未收藏">
			<% } %>
		</p>
	</div>

	<div id="postItem_area">
		<div class="bbs_item_list" id="bbs_item_list">
			<% if(page == 1){ %>
			<article class="main_body">
				<div class="left">
					<span class="avatar">
						<img src="<%= post.authoricon %>" alt="<%= post.author %>">
					</span>
					<span class="level"><%= post.level %>级美人</span>
				</div>
				<div class="right">
					<div class="base">
						<p class="author"><%= post.author %></p>
						<a href="javascript:void(0)" data-tid="<%= tid %>" class="reply js_reply"></a>
					</div>
					<section class="comment_body"><%= post.content %></section>
					<p class="extra">
						<time datetime="<%= post.dateline %>"><%= post.dateline %></time>	
					</p>
					<span class="landlord"><img src="./img/landlord.png" alt="楼主"></span>
				</div>
			</article>
			<% } %>
			
			
			<% _.each(comments, function(item, index){ %>
			<article class="comment">
				<div class="left">
					<span class="avatar">
						<img src="<%= item.authoricon %>" alt="<%= item.author %>">
					</span>
					<span class="level"><%= item.level %>级美人</span>
				</div>
				<div class="right">
					<div class="base">
						<p class="author"><%= item.author %></p>
						<a href="javascript:void(0)" data-tid="<%= tid %>" data-pid="<%= item.pid %>" class="reply js_reply"></a>
					</div>
					<section class="comment_body"><%= item.message %></section>
					<p class="extra">
						<time datetime="<%= item.dateline %>"><%= item.dateline %></time>								
					</p>
					<span class="floor"><%= index + 1 + (page - 1) * perPage %></span> 
				</div>
			</article>
			<% }) %>
		</div>
	</div>
</div>

<footer class="footer hide">
	<div class="paging">
		<p class="item first"><img src="./img/first.png" alt="第一页"></p>
		<p class="item prev"><img src="./img/previous.png" alt="上一页"></p>
		<p class="item page"><input type="text" value="<%= page %> / <%= pages %>" class="page_num" readonly=true></p>
		<p class="item next"><img src="./img/next.png" alt="下一页"></p>
		<p class="item last"><img src="./img/last.png" alt="最后一页"></p>
	</div>
</footer>